{%extends "adminheader.html.twig"%}



{%block body%}

<div id="content1">
    <p class="big">Edytuj treści:</p><form action="{{ URL }}_SkyCMS/tresci/zapisz/{{ news['id'] }}" name="form_dodaj" method="post" enctype="multipart/form-data">
		<input type="hidden" id="strona" name="id" value="{{ news['id'] }}" size="2">
        <a name="form"></a>
        <table>	
            
            {% if(session.login == 'Master') %}
                        <tr>
				<td><p>widok: (<b>kontroler/metoda</b>)</p></td>
				<td><input type="text" name="template" value="{{ news['template']|raw }}" size="50"></td>
			</tr>
            {%else%}
                        <input type="hidden" name="template" value="{{ news['template']|raw }}">
            {%endif%}
                        
			<tr>
				<td><p>nazwa:</p></td>
				<td><input type="text" name="nazwa" value="{{ news['nazwa']|raw }}" size="50"></td>
			</tr>
			<tr>
				<td><p>treść:</p></td>
				<td><textarea name="tresc" id="elm1" rows="15" cols="80" style="800px">{{ news['tresc']|raw }}</textarea></td>
			</tr>		
                        <tr>
                            <td colspan="2" align="right">
					<input type="submit" name="submit" value="zapisz" class="button2"  onclick="this.form.target='_self';this.form.action='{{ URL }}_SkyCMS/tresci/zapisz/{{ news['id'] }}'">				
    
                            {%if news['rodzic'] == 0 %}
                                    <input type="submit" name="podglad" value="podgląd" class="button2" onclick="this.form.action='{{ URL }}_SkyCMS/tresci/podglad/stronaid={{ news['id'] }}';this.form.target='nowe_okno';">
                            {%endif%}
                                    
                            </td>
                                </form>     
			</tr>
			
		</table>
		
</table>
</div>

{%endblock%}